package com.seata.order.controller;


import com.seata.order.service.OrderService;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("/order/create")
//    @GlobalTransactional
    public String create(boolean flag) {
        orderService.create(flag);
        return "生成订单";
    }
}
